package com.wlw.eye.ui.fragment

import android.support.v4.app.Fragment
import com.wlw.eye.R
import com.wlw.eye.adapter.HotAdatpter
import kotlinx.android.synthetic.main.fragment_hot.*

class HotFragment : BaseFragment() {
    var mTabs: MutableList<String> = listOf("周排行", "月排行", "总排行").toMutableList()
    lateinit var mFragment: ArrayList<Fragment>
    val strategy = arrayListOf("weekly", "monthly", "historical")
    override fun getLayoutResources(): Int = R.layout.fragment_hot

    override fun initView() {
        mFragment = ArrayList()
        for (s in strategy) {
            mFragment.add(RankFragment.instance(s))
        }
        vp_content.adapter = fragmentManager?.let { HotAdatpter(it, mFragment, mTabs) }
        tabs.setupWithViewPager(vp_content)
    }
}